package com.yonyou.cloud.member.config.json;

import com.yonyou.cloud.member.config.EntityIdFactory;
import com.yonyou.cloud.member.domainmodel.vo.EntityId;

public class EntityIdJsonDeserializerFactory {
    public <T extends EntityId> EntityIdJsonDeserializer<T> create(Class<T> clazz) {
        return new EntityIdJsonDeserializer<T>() {
            @Override
            public T apply(Long id) {
                return EntityIdFactory.create(clazz).apply(id);
            }
        };
    }
}